package pit.com.ordermobilesystem.http;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Date;

import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;




public class HttpApiWithAuth extends BaseHttpApi {
  private static final String authKey = "thinktodo.net_";

  public HttpApiWithAuth() {
    super();
  }

  public HttpApiWithAuth(DefaultHttpClient httpClient) {
    super(httpClient);
  }



	@Override
	public String doHttpPost(String url, String data) throws HttpApiException, IOException, JSONException {
		return excuteHttpPost(url,  data);
	}

	@Override
	public String doHttpGet(String url) throws HttpApiException, IOException, JSONException {
		return excuteHttpGet(url);
	}

	@Override
	public String doHttpUploadFile(String sUrl, String filePath) {
		
		try {
			return excuteHttpUploadFile(sUrl,filePath);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "";
	}

	@Override
	public String doHttpRequestMultipart(String sUrl, String data,
			String[] path_images) throws IOException {
		return executeHttpRequestMultipart(sUrl, data, path_images);

	}
}
